<?php

use Illuminate\Database\Seeder;

class DemandsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
    	$demands = [];

    	$days = \App\Package\Attendance\Days::month();

    	foreach ($days->collection as $day) {
    		$demands[] = [
				'date' => $day,
				'project_id' => 1,
				'genre_id' => 1,
				'staff' => 2,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
			];
		}

		foreach ($days->collection as $day) {
			$demands[] = [
				'date' => $day,
				'project_id' => 1,
				'genre_id' => 2,
				'staff' => 1,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
			];
		}

    	DB::table('demands')->insert($demands);
    }
}
